home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Frameworks / Hsoi's App Shell 1.0a4 / Hsoi's App Shell Headers / HASMovableModal.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-28  |  2.2 KB  |  61 lines  |  [TEXT/CWIE]

  1. /*
  2.     HASMovableModal.h from Hsoi's App Shell ©1995-1997 John C. Daub.  All rights reserved.
  3.     
  4.     This is the corresponding header file to HASMovableModal.c.  This is not my own work,
  5.     but rather the work of Marco Piovanelli from his MovableModal library version 2.0.
  6.     
  7.     I just modified things here and there to work with Hsoi's App Shell, plus any
  8.     necessary Copland modifications.
  9.  
  10.     from Marco's:
  11.     
  12.     C interface to the MovableModal library
  13.  
  14.     The MovableModal library includes some simple routines to handle
  15.     movable modal dialogs in much the same way as non-movable modal dialogs are
  16.     handled, but following Apple HIGs on the subject
  17.  
  18.     Copyright © 1993-1995 Marco Piovanelli
  19.  
  20.  */
  21.  
  22. #ifndef __DIALOGS__
  23. #include <Dialogs.h>
  24. #endif
  25.  
  26. /*
  27.  *  Call DisableMenuBar soon after putting up your movable modal dialog (the
  28.  *  frontmost window is assumed to be your dialog).
  29.  *  Pass the menu ID of your Edit menu in editMenuID, or 0 if you don't have one.
  30.  *  DisableMenuBar disables all menus except the system menus
  31.  *  (Help, Keyboard and Application).
  32.  *  It enables Cut, Copy and Paste in the Edit menu if your dialog contains edit
  33.  *  fields.
  34.  *  Pass the ID of a valid 'hmnu' resource in hmnuID if you want menu
  35.  *  help string remapping to take place, as described in "Toolbox
  36.  *  M.TB.MovableModalDialog"; otherwise pass -1 (if the Help Manager isn't
  37.  *  available, nothing will happen anyway)
  38.  */
  39.  
  40. pascal void DisableMenuBar(short editMenuID, short hmnuID);
  41.  
  42. /*
  43.  *  Call ReEnableMenuBar soon after bringing down your movable modal dialog box.
  44.  *  ReEnableMenuBar will restore the previous enableFlags for all menus in
  45.  *  the menu bar
  46.  */
  47.  
  48. pascal void ReEnableMenuBar(void);
  49.  
  50. /* 
  51.  *  MovableModalDialog is the routine that does most of the work.
  52.  *  It's very much like the Toolbox routine ModalDialog in system 7.x.
  53.  *  MovableModalDialog allows access to the menu bar (even under system 6.0.x)
  54.  *  and major context switches.
  55.  *  You normally will want to know when a context switch takes place while your
  56.  *  dialog is in front: to do this, you have to check for events of type osEvt
  57.  *  from within your filter procedure
  58.  */
  59.  
  60. pascal void MovableModalDialog(ModalFilterUPP filterProc, short *itemHit);
  61.